import com.sun.xml.internal.ws.addressing.WsaActionUtil;

import java.util.Arrays;

public class Test {
    public static void main9(String[] args) {
        Linkedlist linkedlist =new Linkedlist();
        linkedlist.addFrist(1);
        linkedlist.addFrist(22);
        linkedlist.addFrist(54);
        linkedlist.addFrist(66);
        linkedlist.show();
        System.out.println();
        Node ret = linkedlist.partition(32);
        linkedlist.show2(ret);
    }

    public static void main(String[] args) {
        Linkedlist linkedlist =new Linkedlist();
        linkedlist.addFrist(1);
        linkedlist.addFrist(4);
        linkedlist.addFrist(6);
        linkedlist.addFrist(9);
        linkedlist.show();
        System.out.println();
        Node ret = linkedlist.findKthToTail(3);
        System.out.println(ret.val);
    }

    public static void main7(String[] args) {
        Linkedlist linkedlist = new Linkedlist();
        linkedlist.addFrist(1);
        linkedlist.addFrist(4);
        linkedlist.addFrist(6);
        linkedlist.addFrist(9);
        linkedlist.show();
        System.out.println();
        linkedlist.reverseList1();
        linkedlist.show();
    }

    public static void main6(String[] args) {
        Linkedlist linkedlist = new Linkedlist();
        linkedlist.addFrist(1);
        linkedlist.addFrist(4);
        linkedlist.addFrist(6);
        linkedlist.addFrist(9);
        linkedlist.show();
        System.out.println();
        Node ret = linkedlist.middleNode();
        System.out.println(ret.val);
    }

    public static void main5(String[] args) {
        Linkedlist linkedlist = new Linkedlist();
        linkedlist.addFrist(1);
        linkedlist.addFrist(6);
        linkedlist.addFrist(6);
        linkedlist.addFrist(9);
        linkedlist.show();
        System.out.println();
        linkedlist.removeAllKey(6);
        linkedlist.show();
    }


    public static void main4(String[] args) {
        Linkedlist linkedlist = new Linkedlist();
        linkedlist.creatList();
        linkedlist.addIntex(3,44);
        linkedlist.show();
        System.out.println("==========");
        linkedlist.addIntex(0,13);
        linkedlist.show();
        System.out.println("==============");
        System.out.println(linkedlist.contains(44));
    }

    public static void main3(String[] args) {
        Linkedlist linkedlist = new Linkedlist();
        linkedlist.addLast(5);
        linkedlist.addLast(12);
        linkedlist.addLast(8);
        linkedlist.show();
        System.out.println();

        linkedlist.show();
    }

    public static void main2(String[] args) {
        Linkedlist linkedlist = new Linkedlist();
        linkedlist.addFrist(3);
        linkedlist.addFrist(5);
        linkedlist.addFrist(7);
        linkedlist.show();
        linkedlist.clear();
        System.out.println("hahah");

    }
    public static void main1(String[] args) {
        Linkedlist linkedlist = new Linkedlist();
        linkedlist.creatList();
        linkedlist.show();
    }

}
